package com.light.gulimall.product.dto;

import com.light.gulimall.product.entity.AttrEntity;

import java.util.Objects;

public class AttrDTO extends AttrEntity {

    /**
     * 分组id
     */
    private Long attrGroupId;

    /**
     * 属性名
     */
    private String attrName;
    /**
     * 是否需要检索[0-不需要，1-需要]
     */
    private Integer searchType;
    /**
     * 属性图标
     */
    private String icon;
    /**
     * 可选值列表[用逗号分隔]
     */
    private String valueSelect;
    /**
     * 属性类型[0-销售属性，1-基本属性，2-既是销售属性又是基本属性]
     */
    private Integer attrType;
    /**
     * 启用状态[0 - 禁用，1 - 启用]
     */
    private Long enable;
    /**
     * 所属分类
     */
    private Long catelogId;
    /**
     * 快速展示【是否展示在介绍上；0-否 1-是】，在sku中仍然可以调整
     */
    private Integer showDesc;


    public AttrDTO() {
    }

    public AttrDTO(Long attrGroupId, String attrName, Integer searchType, String icon, String valueSelect, Integer attrType, Long enable, Long catelogId, Integer showDesc) {
        this.attrGroupId = attrGroupId;
        this.attrName = attrName;
        this.searchType = searchType;
        this.icon = icon;
        this.valueSelect = valueSelect;
        this.attrType = attrType;
        this.enable = enable;
        this.catelogId = catelogId;
        this.showDesc = showDesc;
    }

    /**
     * 获取
     * @return attrGroupId
     */
    public Long getAttrGroupId() {
        return attrGroupId;
    }

    /**
     * 设置
     * @param attrGroupId
     */
    public void setAttrGroupId(Long attrGroupId) {
        this.attrGroupId = attrGroupId;
    }

    /**
     * 获取
     * @return attrName
     */
    public String getAttrName() {
        return attrName;
    }

    /**
     * 设置
     * @param attrName
     */
    public void setAttrName(String attrName) {
        this.attrName = attrName;
    }

    /**
     * 获取
     * @return searchType
     */
    public Integer getSearchType() {
        return searchType;
    }

    /**
     * 设置
     * @param searchType
     */
    public void setSearchType(Integer searchType) {
        this.searchType = searchType;
    }

    /**
     * 获取
     * @return icon
     */
    public String getIcon() {
        return icon;
    }

    /**
     * 设置
     * @param icon
     */
    public void setIcon(String icon) {
        this.icon = icon;
    }

    /**
     * 获取
     * @return valueSelect
     */
    public String getValueSelect() {
        return valueSelect;
    }

    /**
     * 设置
     * @param valueSelect
     */
    public void setValueSelect(String valueSelect) {
        this.valueSelect = valueSelect;
    }

    /**
     * 获取
     * @return attrType
     */
    public Integer getAttrType() {
        return attrType;
    }

    /**
     * 设置
     * @param attrType
     */
    public void setAttrType(Integer attrType) {
        this.attrType = attrType;
    }

    /**
     * 获取
     * @return enable
     */
    public Long getEnable() {
        return enable;
    }

    /**
     * 设置
     * @param enable
     */
    public void setEnable(Long enable) {
        this.enable = enable;
    }

    /**
     * 获取
     * @return catelogId
     */
    public Long getCatelogId() {
        return catelogId;
    }

    /**
     * 设置
     * @param catelogId
     */
    public void setCatelogId(Long catelogId) {
        this.catelogId = catelogId;
    }

    /**
     * 获取
     * @return showDesc
     */
    public Integer getShowDesc() {
        return showDesc;
    }

    /**
     * 设置
     * @param showDesc
     */
    public void setShowDesc(Integer showDesc) {
        this.showDesc = showDesc;
    }

    public String toString() {
        return "AttrDTO{attrGroupId = " + attrGroupId + ", attrName = " + attrName + ", searchType = " + searchType + ", icon = " + icon + ", valueSelect = " + valueSelect + ", attrType = " + attrType + ", enable = " + enable + ", catelogId = " + catelogId + ", showDesc = " + showDesc + "}";
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        AttrDTO attrDTO = (AttrDTO) o;
        return Objects.equals(attrGroupId, attrDTO.attrGroupId) && Objects.equals(attrName, attrDTO.attrName) && Objects.equals(searchType, attrDTO.searchType) && Objects.equals(icon, attrDTO.icon) && Objects.equals(valueSelect, attrDTO.valueSelect) && Objects.equals(attrType, attrDTO.attrType) && Objects.equals(enable, attrDTO.enable) && Objects.equals(catelogId, attrDTO.catelogId) && Objects.equals(showDesc, attrDTO.showDesc);
    }

    @Override
    public int hashCode() {
        return Objects.hash(attrGroupId, attrName, searchType, icon, valueSelect, attrType, enable, catelogId, showDesc);
    }
}
